/*
 * forma.h
 *
 * Copyright (C) 2011, 2012 - Massimiliano Maniscalco
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef _FORMA_H_
#define _FORMA_H_

#include "voce.h"

using namespace std;

class Forma: public Voce
{
public:
	Forma() :
		_nome ( "" ), _forma ( "" ), _note ( "" )
	{ }
	inline Forma ( const Forma &pat );
	inline ~Forma ();
	inline bool operator<( const Forma &pat ) const;
	inline bool operator==( const Forma &pat ) const;
	inline void set_nome ( const Glib::ustring &str ) { _nome.assign ( str ); }
	inline void set_nome ( const char *cstr );
	inline Glib::ustring get_nome ( void ) const { return _nome; }
	inline void set_forma ( const Glib::ustring &str ) { _forma.assign ( str ); }
	inline void set_forma ( const char *cstr );
	inline Glib::ustring get_forma ( void ) const { return _forma; }
	inline void set_note ( const Glib::ustring &str ) { _note.assign ( str ); }
	inline void set_note ( const char *cstr );
	inline Glib::ustring get_note ( void ) const { return _note; }
	
private:
	Glib::ustring _nome;
	Glib::ustring _forma;
	Glib::ustring _note;

};

inline Forma::
Forma ( const Forma &pat ) :
	_nome ( pat._nome ), _forma ( pat._forma ), _note ( pat._note )
{
	
}

inline Forma::
~Forma()
{
	
}

inline bool Forma::
operator<( const Forma &pat ) const
{
	return _nome.raw() < pat._nome.raw();
}

inline bool Forma::
operator==( const Forma &pat ) const
{
	return _nome.raw() == pat._nome.raw();
}

inline void Forma::
set_nome ( const char *cstr )
{
	if ( cstr )
	{
		_nome.assign ( cstr );
	}
}

inline void Forma::
set_forma ( const char *cstr )
{
	if ( cstr )
	{
		_forma.assign ( cstr );
	}
}

inline void Forma::
set_note ( const char *cstr )
{
	if ( cstr )
	{
		_note.assign ( cstr );
	}
}

#endif // _FORMA_H_
